package edu.cuc.socket.url.url;

import java.net.URLDecoder;
import java.net.URLEncoder;

public class URLEncodDemo {
    public static void main(String[] args) {
        try {

            String str = "邴睿祺";
            String enString = URLEncoder.encode(str, "utf-8");
            System.out.println(enString);
            String deString = URLDecoder.decode(enString, "gbk");
            System.out.println(str);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}
